package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MemberRaiOrderMapper;
import com.ruoyi.system.domain.MemberRaiOrder;
import com.ruoyi.system.service.IMemberRaiOrderService;

/**
 * 会员权益订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-21
 */
@Service
public class MemberRaiOrderServiceImpl implements IMemberRaiOrderService 
{
    @Autowired
    private MemberRaiOrderMapper memberRaiOrderMapper;

    /**
     * 查询会员权益订单
     * 
     * @param id 会员权益订单主键
     * @return 会员权益订单
     */
    @Override
    public MemberRaiOrder selectMemberRaiOrderById(String id)
    {
        return memberRaiOrderMapper.selectMemberRaiOrderById(id);
    }

    /**
     * 查询会员权益订单列表
     * 
     * @param memberRaiOrder 会员权益订单
     * @return 会员权益订单
     */
    @Override
    public List<MemberRaiOrder> selectMemberRaiOrderList(MemberRaiOrder memberRaiOrder)
    {
        return memberRaiOrderMapper.selectMemberRaiOrderList(memberRaiOrder);
    }

    /**
     * 查询会员权益订单列表
     *
     * @param memberRaiOrder 会员权益订单
     * @return 会员权益订单
     */
    @Override
    public List<MemberRaiOrder> selectMemberRaiOrderListByPhone(MemberRaiOrder memberRaiOrder)
    {
        return memberRaiOrderMapper.selectMemberRaiOrderListByPhone(memberRaiOrder);
    }

    /**
     * 新增会员权益订单
     * 
     * @param memberRaiOrder 会员权益订单
     * @return 结果
     */
    @Override
    public int insertMemberRaiOrder(MemberRaiOrder memberRaiOrder)
    {
        memberRaiOrder.setCreateTime(DateUtils.getNowDate());
        return memberRaiOrderMapper.insertMemberRaiOrder(memberRaiOrder);
    }

    /**
     * 修改会员权益订单
     * 
     * @param memberRaiOrder 会员权益订单
     * @return 结果
     */
    @Override
    public int updateMemberRaiOrder(MemberRaiOrder memberRaiOrder)
    {
        memberRaiOrder.setUpdateTime(DateUtils.getNowDate());
        return memberRaiOrderMapper.updateMemberRaiOrder(memberRaiOrder);
    }

    /**
     * 批量删除会员权益订单
     * 
     * @param ids 需要删除的会员权益订单主键
     * @return 结果
     */
    @Override
    public int deleteMemberRaiOrderByIds(String[] ids)
    {
        return memberRaiOrderMapper.deleteMemberRaiOrderByIds(ids);
    }

    /**
     * 删除会员权益订单信息
     * 
     * @param id 会员权益订单主键
     * @return 结果
     */
    @Override
    public int deleteMemberRaiOrderById(String id)
    {
        return memberRaiOrderMapper.deleteMemberRaiOrderById(id);
    }
}
